package designpattern.builder;

import java.util.ArrayList;
import java.util.List;

public class Computer {

    private final List<String> list = new ArrayList<>();

    public void add(String part){
        list.add(part);
    }

    public void show(){
        for (String s : list){
            System.out.println("组件["+s+"]组装完毕");
        }
        System.out.println("电脑组装完毕");
    }
}
